package com.ccsc.auth.service;

import com.ccsc.auth.entity.Department;
import com.ccsc.auth.entity.Resource;
import com.ccsc.auth.entity.Role;
import com.ccsc.auth.utils.DataMap;
import com.ccsc.auth.utils.Page;

import java.util.List;
import java.util.Map;

/**
 * 资源service
 * Created by yyangs on 2017/2/10.
 */
public interface ResourceService {
    List<Resource> getAllResources() throws Exception;       						                                    //获取全部资源列表
    List<Resource> getResourcesByLevel(Integer level) throws Exception;   			                                    //根据资源级别查资源列表
    List<Resource> getResourcesByRoleId(Integer roleId) throws Exception;                                               //根据角色id查询该角色下资源
    List<Resource> getResourcesBySystemsId(Integer systemsId) throws Exception;                                         //根据系统id查询资源
    List<Resource> getResourcesByParentResourceId(Integer parentResourceId) throws Exception;                           //根据父资源id查询下级所有资源

    Page getResourcesByPage(DataMap params) throws Exception;					                                        //分页查询资源列表
    Page getResourcesByPage(Resource resource,DataMap params) throws Exception;					                        //分页并根据条件查询资源列表
    Resource getResourceById(Integer id) throws Exception;   						                                    //根据资源ID查资源信息
    List<Resource> getResourcelistByRolelist(List<Role> roleList) throws Exception;                                     //根据角色列表 返回资源树

    Integer createResource(Resource resource) throws Exception;  					        	                        //添加资源
    Integer updateResource(Resource resource) throws Exception;   		   		            	                        //修改资源
    Integer deleteResourceById(Integer id) throws Exception; 					                                        //删除资源
}
